1 module gles.gl2;
2 extern (C):
3 
4 enum __gles2_gl2_h_ = 1;
5 
6 /*
7 ** Copyright (c) 2013-2018 The Khronos Group Inc.
8 **
9 ** Permission is hereby granted, free of charge, to any person obtaining a
10 ** copy of this software and/or associated documentation files (the
11 ** "Materials"), to deal in the Materials without restriction, including
12 ** without limitation the rights to use, copy, modify, merge, publish,
13 ** distribute, sublicense, and/or sell copies of the Materials, and to
14 ** permit persons to whom the Materials are furnished to do so, subject to
15 ** the following conditions:
16 **
17 ** The above copyright notice and this permission notice shall be included
18 ** in all copies or substantial portions of the Materials.
19 **
20 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
27 */
28 /*
29 ** This header is generated from the Khronos OpenGL / OpenGL ES XML
30 ** API Registry. The current version of the Registry, generator scripts
31 ** used to make the header, and the header can be found at
32 **   https://github.com/KhronosGroup/OpenGL-Registry
33 */
34 
35 enum GL_GLES_PROTOTYPES = 1;
36 
37 /* Generated on date 20200423 */
38 
39 /* Generated C header for:
40  * API: gles2
41  * Profile: common
42  * Versions considered: 2\.[0-9]
43  * Versions emitted: .*
44  * Default extensions included: None
45  * Additional extensions included: _nomatch_^
46  * Extensions removed: _nomatch_^
47  */
48 
49 enum GL_ES_VERSION_2_0 = 1;
50 
51 alias GLbyte = char;
52 alias GLclampf = float;
53 alias GLfixed = int;
54 alias GLshort = short;
55 alias GLushort = ushort;
56 alias GLvoid = void;
57 struct __GLsync;
58 alias GLsync = __GLsync*;
59 alias GLint64 = long;
60 alias GLuint64 = ulong;
61 alias GLenum = uint;
62 alias GLuint = uint;
63 alias GLchar = char;
64 alias GLfloat = float;
65 alias GLsizeiptr = size_t;
66 alias GLintptr = ptrdiff_t;
67 alias GLbitfield = uint;
68 alias GLint = int;
69 alias GLboolean = ubyte;
70 alias GLsizei = int;
71 alias GLubyte = ubyte;
72 enum GL_DEPTH_BUFFER_BIT = 0x00000100;
73 enum GL_STENCIL_BUFFER_BIT = 0x00000400;
74 enum GL_COLOR_BUFFER_BIT = 0x00004000;
75 enum GL_FALSE = 0;
76 enum GL_TRUE = 1;
77 enum GL_POINTS = 0x0000;
78 enum GL_LINES = 0x0001;
79 enum GL_LINE_LOOP = 0x0002;
80 enum GL_LINE_STRIP = 0x0003;
81 enum GL_TRIANGLES = 0x0004;
82 enum GL_TRIANGLE_STRIP = 0x0005;
83 enum GL_TRIANGLE_FAN = 0x0006;
84 enum GL_ZERO = 0;
85 enum GL_ONE = 1;
86 enum GL_SRC_COLOR = 0x0300;
87 enum GL_ONE_MINUS_SRC_COLOR = 0x0301;
88 enum GL_SRC_ALPHA = 0x0302;
89 enum GL_ONE_MINUS_SRC_ALPHA = 0x0303;
90 enum GL_DST_ALPHA = 0x0304;
91 enum GL_ONE_MINUS_DST_ALPHA = 0x0305;
92 enum GL_DST_COLOR = 0x0306;
93 enum GL_ONE_MINUS_DST_COLOR = 0x0307;
94 enum GL_SRC_ALPHA_SATURATE = 0x0308;
95 enum GL_FUNC_ADD = 0x8006;
96 enum GL_BLEND_EQUATION = 0x8009;
97 enum GL_BLEND_EQUATION_RGB = 0x8009;
98 enum GL_BLEND_EQUATION_ALPHA = 0x883D;
99 enum GL_FUNC_SUBTRACT = 0x800A;
100 enum GL_FUNC_REVERSE_SUBTRACT = 0x800B;
101 enum GL_BLEND_DST_RGB = 0x80C8;
102 enum GL_BLEND_SRC_RGB = 0x80C9;
103 enum GL_BLEND_DST_ALPHA = 0x80CA;
104 enum GL_BLEND_SRC_ALPHA = 0x80CB;
105 enum GL_CONSTANT_COLOR = 0x8001;
106 enum GL_ONE_MINUS_CONSTANT_COLOR = 0x8002;
107 enum GL_CONSTANT_ALPHA = 0x8003;
108 enum GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004;
109 enum GL_BLEND_COLOR = 0x8005;
110 enum GL_ARRAY_BUFFER = 0x8892;
111 enum GL_ELEMENT_ARRAY_BUFFER = 0x8893;
112 enum GL_ARRAY_BUFFER_BINDING = 0x8894;
113 enum GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;
114 enum GL_STREAM_DRAW = 0x88E0;
115 enum GL_STATIC_DRAW = 0x88E4;
116 enum GL_DYNAMIC_DRAW = 0x88E8;
117 enum GL_BUFFER_SIZE = 0x8764;
118 enum GL_BUFFER_USAGE = 0x8765;
119 enum GL_CURRENT_VERTEX_ATTRIB = 0x8626;
120 enum GL_FRONT = 0x0404;
121 enum GL_BACK = 0x0405;
122 enum GL_FRONT_AND_BACK = 0x0408;
123 enum GL_TEXTURE_2D = 0x0DE1;
124 enum GL_CULL_FACE = 0x0B44;
125 enum GL_BLEND = 0x0BE2;
126 enum GL_DITHER = 0x0BD0;
127 enum GL_STENCIL_TEST = 0x0B90;
128 enum GL_DEPTH_TEST = 0x0B71;
129 enum GL_SCISSOR_TEST = 0x0C11;
130 enum GL_POLYGON_OFFSET_FILL = 0x8037;
131 enum GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E;
132 enum GL_SAMPLE_COVERAGE = 0x80A0;
133 enum GL_NO_ERROR = 0;
134 enum GL_INVALID_ENUM = 0x0500;
135 enum GL_INVALID_VALUE = 0x0501;
136 enum GL_INVALID_OPERATION = 0x0502;
137 enum GL_OUT_OF_MEMORY = 0x0505;
138 enum GL_CW = 0x0900;
139 enum GL_CCW = 0x0901;
140 enum GL_LINE_WIDTH = 0x0B21;
141 enum GL_ALIASED_POINT_SIZE_RANGE = 0x846D;
142 enum GL_ALIASED_LINE_WIDTH_RANGE = 0x846E;
143 enum GL_CULL_FACE_MODE = 0x0B45;
144 enum GL_FRONT_FACE = 0x0B46;
145 enum GL_DEPTH_RANGE = 0x0B70;
146 enum GL_DEPTH_WRITEMASK = 0x0B72;
147 enum GL_DEPTH_CLEAR_VALUE = 0x0B73;
148 enum GL_DEPTH_FUNC = 0x0B74;
149 enum GL_STENCIL_CLEAR_VALUE = 0x0B91;
150 enum GL_STENCIL_FUNC = 0x0B92;
151 enum GL_STENCIL_FAIL = 0x0B94;
152 enum GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95;
153 enum GL_STENCIL_PASS_DEPTH_PASS = 0x0B96;
154 enum GL_STENCIL_REF = 0x0B97;
155 enum GL_STENCIL_VALUE_MASK = 0x0B93;
156 enum GL_STENCIL_WRITEMASK = 0x0B98;
157 enum GL_STENCIL_BACK_FUNC = 0x8800;
158 enum GL_STENCIL_BACK_FAIL = 0x8801;
159 enum GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;
160 enum GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;
161 enum GL_STENCIL_BACK_REF = 0x8CA3;
162 enum GL_STENCIL_BACK_VALUE_MASK = 0x8CA4;
163 enum GL_STENCIL_BACK_WRITEMASK = 0x8CA5;
164 enum GL_VIEWPORT = 0x0BA2;
165 enum GL_SCISSOR_BOX = 0x0C10;
166 enum GL_COLOR_CLEAR_VALUE = 0x0C22;
167 enum GL_COLOR_WRITEMASK = 0x0C23;
168 enum GL_UNPACK_ALIGNMENT = 0x0CF5;
169 enum GL_PACK_ALIGNMENT = 0x0D05;
170 enum GL_MAX_TEXTURE_SIZE = 0x0D33;
171 enum GL_MAX_VIEWPORT_DIMS = 0x0D3A;
172 enum GL_SUBPIXEL_BITS = 0x0D50;
173 enum GL_RED_BITS = 0x0D52;
174 enum GL_GREEN_BITS = 0x0D53;
175 enum GL_BLUE_BITS = 0x0D54;
176 enum GL_ALPHA_BITS = 0x0D55;
177 enum GL_DEPTH_BITS = 0x0D56;
178 enum GL_STENCIL_BITS = 0x0D57;
179 enum GL_POLYGON_OFFSET_UNITS = 0x2A00;
180 enum GL_POLYGON_OFFSET_FACTOR = 0x8038;
181 enum GL_TEXTURE_BINDING_2D = 0x8069;
182 enum GL_SAMPLE_BUFFERS = 0x80A8;
183 enum GL_SAMPLES = 0x80A9;
184 enum GL_SAMPLE_COVERAGE_VALUE = 0x80AA;
185 enum GL_SAMPLE_COVERAGE_INVERT = 0x80AB;
186 enum GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;
187 enum GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3;
188 enum GL_DONT_CARE = 0x1100;
189 enum GL_FASTEST = 0x1101;
190 enum GL_NICEST = 0x1102;
191 enum GL_GENERATE_MIPMAP_HINT = 0x8192;
192 enum GL_BYTE = 0x1400;
193 enum GL_UNSIGNED_BYTE = 0x1401;
194 enum GL_SHORT = 0x1402;
195 enum GL_UNSIGNED_SHORT = 0x1403;
196 enum GL_INT = 0x1404;
197 enum GL_UNSIGNED_INT = 0x1405;
198 enum GL_FLOAT = 0x1406;
199 enum GL_FIXED = 0x140C;
200 enum GL_DEPTH_COMPONENT = 0x1902;
201 enum GL_ALPHA = 0x1906;
202 enum GL_RGB = 0x1907;
203 enum GL_RGBA = 0x1908;
204 enum GL_LUMINANCE = 0x1909;
205 enum GL_LUMINANCE_ALPHA = 0x190A;
206 enum GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033;
207 enum GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034;
208 enum GL_UNSIGNED_SHORT_5_6_5 = 0x8363;
209 enum GL_FRAGMENT_SHADER = 0x8B30;
210 enum GL_VERTEX_SHADER = 0x8B31;
211 enum GL_MAX_VERTEX_ATTRIBS = 0x8869;
212 enum GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;
213 enum GL_MAX_VARYING_VECTORS = 0x8DFC;
214 enum GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;
215 enum GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;
216 enum GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872;
217 enum GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;
218 enum GL_SHADER_TYPE = 0x8B4F;
219 enum GL_DELETE_STATUS = 0x8B80;
220 enum GL_LINK_STATUS = 0x8B82;
221 enum GL_VALIDATE_STATUS = 0x8B83;
222 enum GL_ATTACHED_SHADERS = 0x8B85;
223 enum GL_ACTIVE_UNIFORMS = 0x8B86;
224 enum GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;
225 enum GL_ACTIVE_ATTRIBUTES = 0x8B89;
226 enum GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;
227 enum GL_SHADING_LANGUAGE_VERSION = 0x8B8C;
228 enum GL_CURRENT_PROGRAM = 0x8B8D;
229 enum GL_NEVER = 0x0200;
230 enum GL_LESS = 0x0201;
231 enum GL_EQUAL = 0x0202;
232 enum GL_LEQUAL = 0x0203;
233 enum GL_GREATER = 0x0204;
234 enum GL_NOTEQUAL = 0x0205;
235 enum GL_GEQUAL = 0x0206;
236 enum GL_ALWAYS = 0x0207;
237 enum GL_KEEP = 0x1E00;
238 enum GL_REPLACE = 0x1E01;
239 enum GL_INCR = 0x1E02;
240 enum GL_DECR = 0x1E03;
241 enum GL_INVERT = 0x150A;
242 enum GL_INCR_WRAP = 0x8507;
243 enum GL_DECR_WRAP = 0x8508;
244 enum GL_VENDOR = 0x1F00;
245 enum GL_RENDERER = 0x1F01;
246 enum GL_VERSION = 0x1F02;
247 enum GL_EXTENSIONS = 0x1F03;
248 enum GL_NEAREST = 0x2600;
249 enum GL_LINEAR = 0x2601;
250 enum GL_NEAREST_MIPMAP_NEAREST = 0x2700;
251 enum GL_LINEAR_MIPMAP_NEAREST = 0x2701;
252 enum GL_NEAREST_MIPMAP_LINEAR = 0x2702;
253 enum GL_LINEAR_MIPMAP_LINEAR = 0x2703;
254 enum GL_TEXTURE_MAG_FILTER = 0x2800;
255 enum GL_TEXTURE_MIN_FILTER = 0x2801;
256 enum GL_TEXTURE_WRAP_S = 0x2802;
257 enum GL_TEXTURE_WRAP_T = 0x2803;
258 enum GL_TEXTURE = 0x1702;
259 enum GL_TEXTURE_CUBE_MAP = 0x8513;
260 enum GL_TEXTURE_BINDING_CUBE_MAP = 0x8514;
261 enum GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;
262 enum GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;
263 enum GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;
264 enum GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;
265 enum GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;
266 enum GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;
267 enum GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;
268 enum GL_TEXTURE0 = 0x84C0;
269 enum GL_TEXTURE1 = 0x84C1;
270 enum GL_TEXTURE2 = 0x84C2;
271 enum GL_TEXTURE3 = 0x84C3;
272 enum GL_TEXTURE4 = 0x84C4;
273 enum GL_TEXTURE5 = 0x84C5;
274 enum GL_TEXTURE6 = 0x84C6;
275 enum GL_TEXTURE7 = 0x84C7;
276 enum GL_TEXTURE8 = 0x84C8;
277 enum GL_TEXTURE9 = 0x84C9;
278 enum GL_TEXTURE10 = 0x84CA;
279 enum GL_TEXTURE11 = 0x84CB;
280 enum GL_TEXTURE12 = 0x84CC;
281 enum GL_TEXTURE13 = 0x84CD;
282 enum GL_TEXTURE14 = 0x84CE;
283 enum GL_TEXTURE15 = 0x84CF;
284 enum GL_TEXTURE16 = 0x84D0;
285 enum GL_TEXTURE17 = 0x84D1;
286 enum GL_TEXTURE18 = 0x84D2;
287 enum GL_TEXTURE19 = 0x84D3;
288 enum GL_TEXTURE20 = 0x84D4;
289 enum GL_TEXTURE21 = 0x84D5;
290 enum GL_TEXTURE22 = 0x84D6;
291 enum GL_TEXTURE23 = 0x84D7;
292 enum GL_TEXTURE24 = 0x84D8;
293 enum GL_TEXTURE25 = 0x84D9;
294 enum GL_TEXTURE26 = 0x84DA;
295 enum GL_TEXTURE27 = 0x84DB;
296 enum GL_TEXTURE28 = 0x84DC;
297 enum GL_TEXTURE29 = 0x84DD;
298 enum GL_TEXTURE30 = 0x84DE;
299 enum GL_TEXTURE31 = 0x84DF;
300 enum GL_ACTIVE_TEXTURE = 0x84E0;
301 enum GL_REPEAT = 0x2901;
302 enum GL_CLAMP_TO_EDGE = 0x812F;
303 enum GL_MIRRORED_REPEAT = 0x8370;
304 enum GL_FLOAT_VEC2 = 0x8B50;
305 enum GL_FLOAT_VEC3 = 0x8B51;
306 enum GL_FLOAT_VEC4 = 0x8B52;
307 enum GL_INT_VEC2 = 0x8B53;
308 enum GL_INT_VEC3 = 0x8B54;
309 enum GL_INT_VEC4 = 0x8B55;
310 enum GL_BOOL = 0x8B56;
311 enum GL_BOOL_VEC2 = 0x8B57;
312 enum GL_BOOL_VEC3 = 0x8B58;
313 enum GL_BOOL_VEC4 = 0x8B59;
314 enum GL_FLOAT_MAT2 = 0x8B5A;
315 enum GL_FLOAT_MAT3 = 0x8B5B;
316 enum GL_FLOAT_MAT4 = 0x8B5C;
317 enum GL_SAMPLER_2D = 0x8B5E;
318 enum GL_SAMPLER_CUBE = 0x8B60;
319 enum GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;
320 enum GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;
321 enum GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;
322 enum GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;
323 enum GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;
324 enum GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;
325 enum GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;
326 enum GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;
327 enum GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;
328 enum GL_COMPILE_STATUS = 0x8B81;
329 enum GL_INFO_LOG_LENGTH = 0x8B84;
330 enum GL_SHADER_SOURCE_LENGTH = 0x8B88;
331 enum GL_SHADER_COMPILER = 0x8DFA;
332 enum GL_SHADER_BINARY_FORMATS = 0x8DF8;
333 enum GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9;
334 enum GL_LOW_FLOAT = 0x8DF0;
335 enum GL_MEDIUM_FLOAT = 0x8DF1;
336 enum GL_HIGH_FLOAT = 0x8DF2;
337 enum GL_LOW_INT = 0x8DF3;
338 enum GL_MEDIUM_INT = 0x8DF4;
339 enum GL_HIGH_INT = 0x8DF5;
340 enum GL_FRAMEBUFFER = 0x8D40;
341 enum GL_RENDERBUFFER = 0x8D41;
342 enum GL_RGBA4 = 0x8056;
343 enum GL_RGB5_A1 = 0x8057;
344 enum GL_RGB565 = 0x8D62;
345 enum GL_DEPTH_COMPONENT16 = 0x81A5;
346 enum GL_STENCIL_INDEX8 = 0x8D48;
347 enum GL_RENDERBUFFER_WIDTH = 0x8D42;
348 enum GL_RENDERBUFFER_HEIGHT = 0x8D43;
349 enum GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;
350 enum GL_RENDERBUFFER_RED_SIZE = 0x8D50;
351 enum GL_RENDERBUFFER_GREEN_SIZE = 0x8D51;
352 enum GL_RENDERBUFFER_BLUE_SIZE = 0x8D52;
353 enum GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53;
354 enum GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54;
355 enum GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55;
356 enum GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;
357 enum GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;
358 enum GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;
359 enum GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;
360 enum GL_COLOR_ATTACHMENT0 = 0x8CE0;
361 enum GL_DEPTH_ATTACHMENT = 0x8D00;
362 enum GL_STENCIL_ATTACHMENT = 0x8D20;
363 enum GL_NONE = 0;
364 enum GL_FRAMEBUFFER_COMPLETE = 0x8CD5;
365 enum GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;
366 enum GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;
367 enum GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;
368 enum GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD;
369 enum GL_FRAMEBUFFER_BINDING = 0x8CA6;
370 enum GL_RENDERBUFFER_BINDING = 0x8CA7;
371 enum GL_MAX_RENDERBUFFER_SIZE = 0x84E8;
372 enum GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506;
373 alias PFNGLACTIVETEXTUREPROC = void function (GLenum texture);
374 alias PFNGLATTACHSHADERPROC = void function (GLuint program, GLuint shader);
375 alias PFNGLBINDATTRIBLOCATIONPROC = void function (GLuint program, GLuint index, GLchar* name);
376 alias PFNGLBINDBUFFERPROC = void function (GLenum target, GLuint buffer);
377 alias PFNGLBINDFRAMEBUFFERPROC = void function (GLenum target, GLuint framebuffer);
378 alias PFNGLBINDRENDERBUFFERPROC = void function (GLenum target, GLuint renderbuffer);
379 alias PFNGLBINDTEXTUREPROC = void function (GLenum target, GLuint texture);
380 alias PFNGLBLENDCOLORPROC = void function (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
381 alias PFNGLBLENDEQUATIONPROC = void function (GLenum mode);
382 alias PFNGLBLENDEQUATIONSEPARATEPROC = void function (GLenum modeRGB, GLenum modeAlpha);
383 alias PFNGLBLENDFUNCPROC = void function (GLenum sfactor, GLenum dfactor);
384 alias PFNGLBLENDFUNCSEPARATEPROC = void function (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
385 alias PFNGLBUFFERDATAPROC = void function (GLenum target, GLsizeiptr size, void* data, GLenum usage);
386 alias PFNGLBUFFERSUBDATAPROC = void function (GLenum target, GLintptr offset, GLsizeiptr size, const(void)* data);
387 alias PFNGLCHECKFRAMEBUFFERSTATUSPROC = uint function (GLenum target);
388 alias PFNGLCLEARPROC = void function (GLbitfield mask);
389 alias PFNGLCLEARCOLORPROC = void function (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
390 alias PFNGLCLEARDEPTHFPROC = void function (GLfloat d);
391 alias PFNGLCLEARSTENCILPROC = void function (GLint s);
392 alias PFNGLCOLORMASKPROC = void function (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
393 alias PFNGLCOMPILESHADERPROC = void function (GLuint shader);
394 alias PFNGLCOMPRESSEDTEXIMAGE2DPROC = void function (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, void* data);
395 alias PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC = void function (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, void* data);
396 alias PFNGLCOPYTEXIMAGE2DPROC = void function (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
397 alias PFNGLCOPYTEXSUBIMAGE2DPROC = void function (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
398 alias PFNGLCREATEPROGRAMPROC = uint function ();
399 alias PFNGLCREATESHADERPROC = uint function (GLenum type);
400 alias PFNGLCULLFACEPROC = void function (GLenum mode);
401 alias PFNGLDELETEBUFFERSPROC = void function (GLsizei n, GLuint* buffers);
402 alias PFNGLDELETEFRAMEBUFFERSPROC = void function (GLsizei n, GLuint* framebuffers);
403 alias PFNGLDELETEPROGRAMPROC = void function (GLuint program);
404 alias PFNGLDELETERENDERBUFFERSPROC = void function (GLsizei n, GLuint* renderbuffers);
405 alias PFNGLDELETESHADERPROC = void function (GLuint shader);
406 alias PFNGLDELETETEXTURESPROC = void function (GLsizei n, GLuint* textures);
407 alias PFNGLDEPTHFUNCPROC = void function (GLenum func);
408 alias PFNGLDEPTHMASKPROC = void function (GLboolean flag);
409 alias PFNGLDEPTHRANGEFPROC = void function (GLfloat n, GLfloat f);
410 alias PFNGLDETACHSHADERPROC = void function (GLuint program, GLuint shader);
411 alias PFNGLDISABLEPROC = void function (GLenum cap);
412 alias PFNGLDISABLEVERTEXATTRIBARRAYPROC = void function (GLuint index);
413 alias PFNGLDRAWARRAYSPROC = void function (GLenum mode, GLint first, GLsizei count);
414 alias PFNGLDRAWELEMENTSPROC = void function (GLenum mode, GLsizei count, GLenum type, void* indices);
415 alias PFNGLENABLEPROC = void function (GLenum cap);
416 alias PFNGLENABLEVERTEXATTRIBARRAYPROC = void function (GLuint index);
417 alias PFNGLFINISHPROC = void function ();
418 alias PFNGLFLUSHPROC = void function ();
419 alias PFNGLFRAMEBUFFERRENDERBUFFERPROC = void function (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
420 alias PFNGLFRAMEBUFFERTEXTURE2DPROC = void function (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
421 alias PFNGLFRONTFACEPROC = void function (GLenum mode);
422 alias PFNGLGENBUFFERSPROC = void function (GLsizei n, GLuint* buffers);
423 alias PFNGLGENERATEMIPMAPPROC = void function (GLenum target);
424 alias PFNGLGENFRAMEBUFFERSPROC = void function (GLsizei n, GLuint* framebuffers);
425 alias PFNGLGENRENDERBUFFERSPROC = void function (GLsizei n, GLuint* renderbuffers);
426 alias PFNGLGENTEXTURESPROC = void function (GLsizei n, GLuint* textures);
427 alias PFNGLGETACTIVEATTRIBPROC = void function (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
428 alias PFNGLGETACTIVEUNIFORMPROC = void function (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
429 alias PFNGLGETATTACHEDSHADERSPROC = void function (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders);
430 alias PFNGLGETATTRIBLOCATIONPROC = int function (GLuint program, GLchar* name);
431 alias PFNGLGETBOOLEANVPROC = void function (GLenum pname, GLboolean* data);
432 alias PFNGLGETBUFFERPARAMETERIVPROC = void function (GLenum target, GLenum pname, GLint* params);
433 alias PFNGLGETERRORPROC = uint function ();
434 alias PFNGLGETFLOATVPROC = void function (GLenum pname, GLfloat* data);
435 alias PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC = void function (GLenum target, GLenum attachment, GLenum pname, GLint* params);
436 alias PFNGLGETINTEGERVPROC = void function (GLenum pname, GLint* data);
437 alias PFNGLGETPROGRAMIVPROC = void function (GLuint program, GLenum pname, GLint* params);
438 alias PFNGLGETPROGRAMINFOLOGPROC = void function (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
439 alias PFNGLGETRENDERBUFFERPARAMETERIVPROC = void function (GLenum target, GLenum pname, GLint* params);
440 alias PFNGLGETSHADERIVPROC = void function (GLuint shader, GLenum pname, GLint* params);
441 alias PFNGLGETSHADERINFOLOGPROC = void function (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
442 alias PFNGLGETSHADERPRECISIONFORMATPROC = void function (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
443 alias PFNGLGETSHADERSOURCEPROC = void function (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* source);
444 alias PFNGLGETSTRINGPROC = ubyte* function (GLenum name);
445 alias PFNGLGETTEXPARAMETERFVPROC = void function (GLenum target, GLenum pname, GLfloat* params);
446 alias PFNGLGETTEXPARAMETERIVPROC = void function (GLenum target, GLenum pname, GLint* params);
447 alias PFNGLGETUNIFORMFVPROC = void function (GLuint program, GLint location, GLfloat* params);
448 alias PFNGLGETUNIFORMIVPROC = void function (GLuint program, GLint location, GLint* params);
449 alias PFNGLGETUNIFORMLOCATIONPROC = int function (GLuint program, GLchar* name);
450 alias PFNGLGETVERTEXATTRIBFVPROC = void function (GLuint index, GLenum pname, GLfloat* params);
451 alias PFNGLGETVERTEXATTRIBIVPROC = void function (GLuint index, GLenum pname, GLint* params);
452 alias PFNGLGETVERTEXATTRIBPOINTERVPROC = void function (GLuint index, GLenum pname, void** pointer);
453 alias PFNGLHINTPROC = void function (GLenum target, GLenum mode);
454 alias PFNGLISBUFFERPROC = ubyte function (GLuint buffer);
455 alias PFNGLISENABLEDPROC = ubyte function (GLenum cap);
456 alias PFNGLISFRAMEBUFFERPROC = ubyte function (GLuint framebuffer);
457 alias PFNGLISPROGRAMPROC = ubyte function (GLuint program);
458 alias PFNGLISRENDERBUFFERPROC = ubyte function (GLuint renderbuffer);
459 alias PFNGLISSHADERPROC = ubyte function (GLuint shader);
460 alias PFNGLISTEXTUREPROC = ubyte function (GLuint texture);
461 alias PFNGLLINEWIDTHPROC = void function (GLfloat width);
462 alias PFNGLLINKPROGRAMPROC = void function (GLuint program);
463 alias PFNGLPIXELSTOREIPROC = void function (GLenum pname, GLint param);
464 alias PFNGLPOLYGONOFFSETPROC = void function (GLfloat factor, GLfloat units);
465 alias PFNGLREADPIXELSPROC = void function (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
466 alias PFNGLRELEASESHADERCOMPILERPROC = void function ();
467 alias PFNGLRENDERBUFFERSTORAGEPROC = void function (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
468 alias PFNGLSAMPLECOVERAGEPROC = void function (GLfloat value, GLboolean invert);
469 alias PFNGLSCISSORPROC = void function (GLint x, GLint y, GLsizei width, GLsizei height);
470 alias PFNGLSHADERBINARYPROC = void function (GLsizei count, GLuint* shaders, GLenum binaryformat, void* binary, GLsizei length);
471 alias PFNGLSHADERSOURCEPROC = void function (GLuint shader, GLsizei count, GLchar** string, GLint* length);
472 alias PFNGLSTENCILFUNCPROC = void function (GLenum func, GLint ref_, GLuint mask);
473 alias PFNGLSTENCILFUNCSEPARATEPROC = void function (GLenum face, GLenum func, GLint ref_, GLuint mask);
474 alias PFNGLSTENCILMASKPROC = void function (GLuint mask);
475 alias PFNGLSTENCILMASKSEPARATEPROC = void function (GLenum face, GLuint mask);
476 alias PFNGLSTENCILOPPROC = void function (GLenum fail, GLenum zfail, GLenum zpass);
477 alias PFNGLSTENCILOPSEPARATEPROC = void function (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
478 alias PFNGLTEXIMAGE2DPROC = void function (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, void* pixels);
479 alias PFNGLTEXPARAMETERFPROC = void function (GLenum target, GLenum pname, GLfloat param);
480 alias PFNGLTEXPARAMETERFVPROC = void function (GLenum target, GLenum pname, GLfloat* params);
481 alias PFNGLTEXPARAMETERIPROC = void function (GLenum target, GLenum pname, GLint param);
482 alias PFNGLTEXPARAMETERIVPROC = void function (GLenum target, GLenum pname, GLint* params);
483 alias PFNGLTEXSUBIMAGE2DPROC = void function (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
484 alias PFNGLUNIFORM1FPROC = void function (GLint location, GLfloat v0);
485 alias PFNGLUNIFORM1FVPROC = void function (GLint location, GLsizei count, GLfloat* value);
486 alias PFNGLUNIFORM1IPROC = void function (GLint location, GLint v0);
487 alias PFNGLUNIFORM1IVPROC = void function (GLint location, GLsizei count, GLint* value);
488 alias PFNGLUNIFORM2FPROC = void function (GLint location, GLfloat v0, GLfloat v1);
489 alias PFNGLUNIFORM2FVPROC = void function (GLint location, GLsizei count, GLfloat* value);
490 alias PFNGLUNIFORM2IPROC = void function (GLint location, GLint v0, GLint v1);
491 alias PFNGLUNIFORM2IVPROC = void function (GLint location, GLsizei count, GLint* value);
492 alias PFNGLUNIFORM3FPROC = void function (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
493 alias PFNGLUNIFORM3FVPROC = void function (GLint location, GLsizei count, GLfloat* value);
494 alias PFNGLUNIFORM3IPROC = void function (GLint location, GLint v0, GLint v1, GLint v2);
495 alias PFNGLUNIFORM3IVPROC = void function (GLint location, GLsizei count, GLint* value);
496 alias PFNGLUNIFORM4FPROC = void function (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
497 alias PFNGLUNIFORM4FVPROC = void function (GLint location, GLsizei count, GLfloat* value);
498 alias PFNGLUNIFORM4IPROC = void function (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
499 alias PFNGLUNIFORM4IVPROC = void function (GLint location, GLsizei count, GLint* value);
500 alias PFNGLUNIFORMMATRIX2FVPROC = void function (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
501 alias PFNGLUNIFORMMATRIX3FVPROC = void function (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
502 alias PFNGLUNIFORMMATRIX4FVPROC = void function (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
503 alias PFNGLUSEPROGRAMPROC = void function (GLuint program);
504 alias PFNGLVALIDATEPROGRAMPROC = void function (GLuint program);
505 alias PFNGLVERTEXATTRIB1FPROC = void function (GLuint index, GLfloat x);
506 alias PFNGLVERTEXATTRIB1FVPROC = void function (GLuint index, GLfloat* v);
507 alias PFNGLVERTEXATTRIB2FPROC = void function (GLuint index, GLfloat x, GLfloat y);
508 alias PFNGLVERTEXATTRIB2FVPROC = void function (GLuint index, GLfloat* v);
509 alias PFNGLVERTEXATTRIB3FPROC = void function (GLuint index, GLfloat x, GLfloat y, GLfloat z);
510 alias PFNGLVERTEXATTRIB3FVPROC = void function (GLuint index, GLfloat* v);
511 alias PFNGLVERTEXATTRIB4FPROC = void function (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
512 alias PFNGLVERTEXATTRIB4FVPROC = void function (GLuint index, GLfloat* v);
513 alias PFNGLVERTEXATTRIBPOINTERPROC = void function (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void* pointer);
514 alias PFNGLVIEWPORTPROC = void function (GLint x, GLint y, GLsizei width, GLsizei height);
515 void glActiveTexture (GLenum texture);
516 void glAttachShader (GLuint program, GLuint shader);
517 void glBindAttribLocation (GLuint program, GLuint index, GLchar* name);
518 void glBindBuffer (GLenum target, GLuint buffer);
519 void glBindFramebuffer (GLenum target, GLuint framebuffer);
520 void glBindRenderbuffer (GLenum target, GLuint renderbuffer);
521 void glBindTexture (GLenum target, GLuint texture);
522 void glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
523 void glBlendEquation (GLenum mode);
524 void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
525 void glBlendFunc (GLenum sfactor, GLenum dfactor);
526 void glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
527 version(WebAssembly)
528 {
529     void glBufferData (GLenum target, GLuint size, void* data, GLenum usage);
530     void glBufferSubData (GLenum target, GLint offset, GLuint size, const(void)* data);
531 }
532 else
533 {
534     void glBufferData (GLenum target, GLsizeiptr size, void* data, GLenum usage);
535     void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const(void)* data);
536 }
537 GLenum glCheckFramebufferStatus (GLenum target);
538 void glClear (GLbitfield mask);
539 void glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
540 void glClearDepthf (GLfloat d);
541 void glClearStencil (GLint s);
542 void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
543 void glCompileShader (GLuint shader);
544 void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, void* data);
545 void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, void* data);
546 void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
547 void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
548 GLuint glCreateProgram ();
549 GLuint glCreateShader (GLenum type);
550 void glCullFace (GLenum mode);
551 version(WebAssembly)
552 {
553     void glDeleteBuffer(GLuint buffer);
554     void glDeleteBuffers (GLsizei n, GLuint* buffers)
555     {
556         assert(n == 1, "WebGL only allows deleting 1 buffer");
557         glDeleteBuffer(*buffers);
558         *buffers = 0;
559     }
560 }
561 else
562 {
563     void glDeleteBuffers (GLsizei n, GLuint* buffers);
564 }
565 version(WebAssembly)
566 {
567     void glDeleteFramebuffer(GLuint framebuffer);
568     void glDeleteFramebuffers (GLsizei n, GLuint* framebuffers)
569     {
570         assert(n == 1, "WebGL only allows deleting 1 framebuffer");
571         glDeleteFramebuffer(*framebuffers);
572         *framebuffers = 0;
573     }
574 }
575 else
576 {
577     void glDeleteFramebuffers (GLsizei n, GLuint* framebuffers);
578 }
579 void glDeleteProgram (GLuint program);
580 version(WebAssembly)
581 {
582     void glDeleteRenderbuffer(GLuint renderbuffer);
583     void glDeleteRenderbuffers (GLsizei n, GLuint* renderbuffers)
584     {
585         assert(n == 1, "WebGL only allows deleting 1 Renderbuffer");
586         glDeleteRenderbuffer(*renderbuffers);
587         *renderbuffers = 0;
588     }
589 }
590 else
591 {
592     void glDeleteRenderbuffers (GLsizei n, GLuint* renderbuffers);
593 }
594 void glDeleteShader (GLuint shader);
595 version(WebAssembly)
596 {
597     void glDeleteTexture(GLuint texture);
598     void glDeleteTextures (GLsizei n, GLuint* textures)
599     {
600         assert(n == 1, "WebGL only allows deleting 1 texture");
601         glDeleteTexture(*textures);
602         *textures = 0;
603     }    
604 }
605 else
606 {
607     void glDeleteTextures (GLsizei n, GLuint* textures);
608 }
609 void glDepthFunc (GLenum func);
610 void glDepthMask (GLboolean flag);
611 void glDepthRangef (GLfloat n, GLfloat f);
612 void glDetachShader (GLuint program, GLuint shader);
613 void glDisable (GLenum cap);
614 void glDisableVertexAttribArray (GLuint index);
615 void glDrawArrays (GLenum mode, GLint first, GLsizei count);
616 void glDrawElements (GLenum mode, GLsizei count, GLenum type, void* indices);
617 void glEnable (GLenum cap);
618 void glEnableVertexAttribArray (GLuint index);
619 void glFinish ();
620 void glFlush ();
621 void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
622 void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
623 void glFrontFace (GLenum mode);
624 version(WebAssembly)
625 {
626     GLuint glCreateBuffer();
627     void glGenBuffers (GLsizei n, GLuint* buffers)
628     {
629         assert(n == 1, "Can't create more than one buffer on wasm");
630         *buffers = glCreateBuffer();
631     }
632 }
633 else
634 {
635     void glGenBuffers (GLsizei n, GLuint* buffers);
636 }
637 void glGenerateMipmap (GLenum target);
638 version(WebAssembly)
639 {
640     GLuint glCreateFramebuffer();
641     GLuint glCreateRenderbuffer();
642 
643     void glGenFramebuffers (GLsizei n, GLuint* framebuffers)
644     {
645         assert(n == 1, "WebGL can only create 1 framebuffer per time");
646         *framebuffers = glCreateFramebuffer();
647     }
648     void glGenRenderbuffers (GLsizei n, GLuint* renderbuffers)
649     {
650         assert(n == 1, "WebGL can only create 1 renderbuffer per time");
651         *renderbuffers = glCreateRenderbuffer();
652     }
653 }
654 else
655 {
656     void glGenFramebuffers (GLsizei n, GLuint* framebuffers);
657     void glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
658 }
659 version(WebAssembly)
660 {
661     GLuint glCreateTexture ();
662     void glGenTextures (GLsizei n, GLuint* textures)
663     {
664         assert(n == 1, "WebGL only allows generating 1 texture per time.");
665         *textures = glCreateTexture();
666     }
667 }
668 else
669 {
670     void glGenTextures (GLsizei n, GLuint* textures);
671 }
672 void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
673 void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
674 void glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei* count, GLuint* shaders);
675 GLint glGetAttribLocation (GLuint program, GLchar* name);
676 void glGetBooleanv (GLenum pname, GLboolean* data);
677 void glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
678 GLenum glGetError ();
679 void glGetFloatv (GLenum pname, GLfloat* data);
680 void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
681 version(WebAssembly)
682 {
683     GLint glGetParameter(GLenum pname);
684     void glGetIntegerv (GLenum pname, GLint* data)
685     {
686         *data = glGetParameter(pname);
687     }
688 }
689 else
690 {
691     void glGetIntegerv (GLenum pname, GLint* data);
692 }
693 version(WebAssembly)
694 {
695     GLint glGetProgramParameter (GLuint program, GLenum pname);
696     void glGetProgramiv (GLuint program, GLenum pname, GLint* params)
697     {
698         *params = glGetProgramParameter(program, pname);
699     }
700 }
701 else
702 {
703     void glGetProgramiv (GLuint program, GLenum pname, GLint* params);
704 }
705 void glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
706 void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
707 version(WebAssembly)
708 {
709     GLint glGetShaderParameter(GLuint shader, GLenum pname);
710     void glGetShaderiv (GLuint shader, GLenum pname, GLint* params)
711     {
712         *params = glGetShaderParameter(shader, pname);
713     }
714 }
715 else
716 {
717     void glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
718 }
719 version(WebAssembly)
720 {
721     /**
722     *   After deep thought, I think calling wglGetShaderInfoLog the best thing to do.
723     *   That way, memory can be safely freed.
724     */
725     ubyte* wglGetShaderInfoLog(GLuint shader);
726     extern(C) void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog)
727     {
728         ubyte* _temp = wglGetShaderInfoLog(shader);
729         size_t _tempLen = *cast(size_t*)_temp;
730         string temp = cast(string)_temp[size_t.sizeof.._tempLen+size_t.sizeof];
731 
732 
733         if(length !is null)
734             *length = temp.length;
735         if(temp.length < bufSize)
736             infoLog[0..temp.length] = temp[];
737         else
738             infoLog[0..bufSize] = temp[0..bufSize];
739     }
740 
741 }
742 else
743 {
744     void glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
745 }
746 void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
747 void glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* source);
748 version(WebAssembly)
749 {
750     GLubyte* glGetString (GLenum name)
751     {
752         switch(name)
753         {
754             case GL_RENDERER:
755                 return cast(GLubyte*)"OpenGLES 2.0 emulated by WebGL 1.0(Hipreme Engine)".ptr;
756             case GL_VERSION:
757                 return cast(GLubyte*)"WebGL 1.0".ptr;
758             case GL_SHADING_LANGUAGE_VERSION:
759                 return cast(GLubyte*)"WebGL GLSL 1.0.0".ptr;
760             default:
761             return null;
762         }
763     }
764 }
765 else
766 {
767     GLubyte* glGetString (GLenum name);
768 }
769 void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
770 void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
771 void glGetUniformfv (GLuint program, GLint location, GLfloat* params);
772 void glGetUniformiv (GLuint program, GLint location, GLint* params);
773 version(WebAssembly)
774 {
775     GLint wglGetUniformLocation(GLuint program, GLuint length, GLchar* name);
776     GLint glGetUniformLocation (GLuint program, GLchar* name)
777     {
778         size_t length = 0;
779         while(name[length++] != '\0'){}
780         assert(length != 0, "Can't send a 0 length string to wglGetUniformLocation");
781         return wglGetUniformLocation(program, length-1, name);
782     }
783 }
784 else
785 {
786     GLint glGetUniformLocation (GLuint program, GLchar* name);
787 }
788 void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
789 void glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
790 void glGetVertexAttribPointerv (GLuint index, GLenum pname, void** pointer);
791 void glHint (GLenum target, GLenum mode);
792 GLboolean glIsBuffer (GLuint buffer);
793 GLboolean glIsEnabled (GLenum cap);
794 GLboolean glIsFramebuffer (GLuint framebuffer);
795 GLboolean glIsProgram (GLuint program);
796 GLboolean glIsRenderbuffer (GLuint renderbuffer);
797 GLboolean glIsShader (GLuint shader);
798 GLboolean glIsTexture (GLuint texture);
799 void glLineWidth (GLfloat width);
800 void glLinkProgram (GLuint program);
801 void glPixelStorei (GLenum pname, GLint param);
802 void glPolygonOffset (GLfloat factor, GLfloat units);
803 void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
804 void glReleaseShaderCompiler ();
805 void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
806 void glSampleCoverage (GLfloat value, GLboolean invert);
807 void glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
808 void glShaderBinary (GLsizei count, GLuint* shaders, GLenum binaryformat, void* binary, GLsizei length);
809 version(WebAssembly)
810 {
811     void wglShaderSource (GLuint shader, GLchar* string_, GLint length);
812     void glShaderSource (GLuint shader, GLsizei count, GLchar** string, GLint* length)
813     {
814         assert(count == 1, "Can't pass more than one string to WebGL glShaderSource.");
815         GLint sourceSize = 0;
816         GLchar* str = *string;
817         if(length != null)
818             sourceSize = *length;
819         else
820         {
821             while(str[sourceSize++] != '\0'){}
822         }
823         //Null character ending is not accepted on firefox.
824         wglShaderSource(shader, str, sourceSize - 1);
825     }
826 }
827 else
828 {
829     void glShaderSource (GLuint shader, GLsizei count, GLchar** string, GLint* length);
830 }
831 void glStencilFunc (GLenum func, GLint ref_, GLuint mask);
832 void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref_, GLuint mask);
833 void glStencilMask (GLuint mask);
834 void glStencilMaskSeparate (GLenum face, GLuint mask);
835 void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
836 void glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
837 void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, void* pixels);
838 void glTexParameterf (GLenum target, GLenum pname, GLfloat param);
839 void glTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
840 void glTexParameteri (GLenum target, GLenum pname, GLint param);
841 void glTexParameteriv (GLenum target, GLenum pname, GLint* params);
842 void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
843 void glUniform1f (GLint location, GLfloat v0);
844 void glUniform1fv (GLint location, GLsizei count, GLfloat* value);
845 void glUniform1i (GLint location, GLint v0);
846 void glUniform1iv (GLint location, GLsizei count, GLint* value);
847 void glUniform2f (GLint location, GLfloat v0, GLfloat v1);
848 void glUniform2fv (GLint location, GLsizei count, GLfloat* value);
849 void glUniform2i (GLint location, GLint v0, GLint v1);
850 void glUniform2iv (GLint location, GLsizei count, GLint* value);
851 void glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
852 void glUniform3fv (GLint location, GLsizei count, GLfloat* value);
853 void glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
854 void glUniform3iv (GLint location, GLsizei count, GLint* value);
855 void glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
856 void glUniform4fv (GLint location, GLsizei count, GLfloat* value);
857 void glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
858 void glUniform4iv (GLint location, GLsizei count, GLint* value);
859 void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
860 void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
861 void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, GLfloat* value);
862 void glUseProgram (GLuint program);
863 void glValidateProgram (GLuint program);
864 void glVertexAttrib1f (GLuint index, GLfloat x);
865 void glVertexAttrib1fv (GLuint index, GLfloat* v);
866 void glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
867 void glVertexAttrib2fv (GLuint index, GLfloat* v);
868 void glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
869 void glVertexAttrib3fv (GLuint index, GLfloat* v);
870 void glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
871 void glVertexAttrib4fv (GLuint index, GLfloat* v);
872 void glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void* pointer);
873 void glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
874 
875 /* GL_ES_VERSION_2_0 */
876